package com.codeoss.module.res.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.codeoss.framework.service.impl.BaseService;
import com.codeoss.module.res.dao.ResRelRoleMobileMenuMapper;
import com.codeoss.module.res.model.ResRelRoleMobileMenu;
import com.codeoss.module.res.service.IResRelRoleMobileMenuService;

@Service
public class ResRelRoleMobileMenuService extends BaseService<ResRelRoleMobileMenuMapper, ResRelRoleMobileMenu>
		implements IResRelRoleMobileMenuService {

	@Override
	public List<Long> getMobileMenuIdListByRoleId(Long resRoleId) {
		// TODO Auto-generated method stub
		List<Long> idList=new ArrayList<Long>();
		QueryWrapper<ResRelRoleMobileMenu> query=new QueryWrapper<ResRelRoleMobileMenu>();
		query.eq("res_role_id", resRoleId);
		List<ResRelRoleMobileMenu> relList=list(query);
		for(ResRelRoleMobileMenu resRelRoleMenu:relList) {
			idList.add(resRelRoleMenu.getIrMobileMenuId());
		}
		return idList;
	}
}